#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main()
{
	int n, m, count = 0;
	scanf("%d %d", &n, &m);
	while (n || m)
	{
		if ((n & 1) != (m & 1))
		{
			count++;
		}			
		n = n >> 1;
		m = m >> 1;

	}
	printf("%d", count);
	return 0;
}